Handling Gait Disturbances with Asynchronous Timing

ABSTRACT

An example method may include i) detecting a disturbance to a gait of a robot, where the gait includes a swing state and a step down state, the swing state including a target swing trajectory for a foot of the robot, and where the target swing trajectory includes a beginning and an end; and ii) based on the detected disturbance, causing the foot of the robot to enter the step down state before the foot reaches the end of the target swing trajectory.

CROSS REFERENCE TO RELATED APPLICATIONS

This U.S. patent application is a continuation of, and claims priorityunder 35 U.S.C. § 120 from U.S. patent application Ser. No. 15/714,451,filed Sep. 25, 2017, which is a continuation of U.S. patent applicationSer. No. 15/190,127, filed on Jun. 22, 2016, which is a continuation ofU.S. patent application Ser. No. 14/468,118, filed on Aug. 25, 2014. Thedisclosures of these prior applications are considered part of thedisclosure of this application and are hereby incorporated by referencein their entireties.

GOVERNMENT LICENSE RIGHTS

This invention was made with government support under HR00011-10-C-0025and W91CRB-11-C-0047 awarded by the Defense Advanced Research ProjectsAgency. The government has certain rights in the invention.

BACKGROUND

As technology advances, various types of robotic devices are beingcreated for performing a variety of functions that may assist users.Robotic devices may be used for applications involving materialhandling, transportation, welding, assembly, and dispensing, amongothers. Over time, the manner in which these robotic systems operate isbecoming more intelligent, efficient, and intuitive. As robotic systemsbecome increasingly prevalent in numerous aspects of modern life, thedesire for efficient robotic systems becomes apparent. Therefore, ademand for efficient robotic systems has helped open up a field ofinnovation in actuators, movement, sensing techniques, as well ascomponent design and assembly.

SUMMARY

The present disclosure generally relates to systems and methods forcontrolling a legged robot. Specifically, implementations describedherein may allow for efficient operation of a legged robot thatencounters rough or uneven terrain. These as well as other aspects,advantages, and alternatives will become apparent to those of ordinaryskill in the art by reading the following detailed description, withreference where appropriate to the accompanying drawings.

A first example implementation may include i) detecting a disturbance toa gait of a robot, where the gait includes a swing state and a step downstate, the swing state including a target swing trajectory for a foot ofthe robot, and where the target swing trajectory includes a beginningand an end; and ii) based on the detected disturbance, causing the footof the robot to leave the swing state and enter the step down statebefore the foot reaches the end of the target swing trajectory.

A second example implementation may include i) determining, by a robothaving a first foot and a second foot, a gait including a swing stateand a stance state, the swing state including a target swing trajectoryfor the first foot of the robot, where the target swing trajectoryincludes a beginning and an end; ii) detecting an indication that thefirst foot of the robot has contacted a ground surface before the end ofthe target swing trajectory; and iii) based on the detected indication,causing the second foot of the robot to lift off of the ground surface.

A third example implementation may include i) determining, by a robothaving a first foot and a second foot, a gait for the robot where thegait includes a swing state and a stance state; ii) determining, by therobot, an anticipated time for the first foot in the swing state tocontact a ground surface; iii) detecting an indication that the firstfoot of the robot has not contacted the ground surface within theanticipated time; and iv) based on the detected indication, reducing aground reaction force on the second foot in contact with the groundsurface.

A fourth example implementation may include a system having means forperforming operations in accordance with the first exampleimplementation.

A fifth example implementation may include a system having means forperforming operations in accordance with the first secondimplementation.

A sixth example implementation may include a system having means forperforming operations in accordance with the third exampleimplementation.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 illustrates a configuration of a robotic system, according to anexample implementation.

FIG. 2 illustrates a quadruped robot, according to an exampleimplementation.

FIG. 3 illustrates another quadruped robot, according to an exampleimplementation.

FIG. 4 illustrates a biped robot, according to an exampleimplementation.

FIG. 5 is a flowchart according to an example implementation.

FIG. 6A illustrates a threshold orientation of a ground reaction force,according to an example implementation.

FIG. 6B illustrates another threshold orientation of a ground reactionforce, according to an example implementation.

FIG. 6C illustrates another threshold orientation of a ground reactionforce, according to an example implementation.

FIG. 6D illustrates another threshold orientation of a ground reactionforce, according to an example implementation.

FIG. 7 is a flowchart according to an example implementation.

FIG. 8A illustrates a pair of feet of a robot in contact with a groundsurface, according to an example implementation.

FIG. 8B illustrates the pair of feet of the robot in contact with theground surface, according to an example implementation.

FIG. 8C illustrates the pair of feet of the robot in contact with theground surface, according to an example implementation.

FIG. 9 is a flowchart according to an example implementation.

FIG. 10A illustrates a foot of a robot in contact with a ground surface,according to an example implementation.

FIG. 10B illustrates the foot of the robot in contact with the groundsurface, according to an example implementation.

FIG. 10C illustrates the foot of the robot in contact with the groundsurface, according to an example implementation.

FIG. 11 illustrates leg states in a mechanically timed gait of a robot,according to an example implementation.

FIG. 12 is a flowchart according to an example implementation.

FIG. 13 is a flowchart according to an example implementation.

FIG. 14 illustrates an example robot traversing a path that includesuneven terrain.

FIG. 15 is a flowchart according to an example implementation.

DETAILED DESCRIPTION

Example apparatuses, systems and methods are described herein. It shouldbe understood that the words “example,” “exemplary,” and “illustrative”are used herein to mean “serving as an example, instance, orillustration.” Any implementation or feature described herein as beingan “example,” being “exemplary,” or being “illustrative” is notnecessarily to be construed as preferred or advantageous over otherimplementations or features. The example implementations describedherein are not meant to be limiting. It will be readily understood thatthe aspects of the present disclosure, as generally described herein andillustrated in the Figures, can be arranged, substituted, combined,separated, and designed in a wide variety of different configurations,all of which are contemplated herein. Further, unless otherwise noted,Figures are not drawn to scale and are used for illustrative purposesonly. Moreover, the Figures are representational only and not allcomponents are shown. For example, additional structural or restrainingcomponents might not be shown.

I. Overview

Example implementations relate to the control of legged robots. Inparticular, example implementations may relate to methods forcontrolling a legged robot by attempting to avoid slips of the robot'sfeet, detecting slips that do occur, and handling and/or responding todetected slips and other disturbances to a gait of the robot.

An example robot may detect, via one or more force sensors, a groundreaction force that acts upon each leg of the robot that is in contactwith a ground surface. The ground reaction force is the force exerted onthe robot by the ground surface, opposing the robot's actions upon theground surface. For example, when a robot moves forward by pushing offof the ground with its leg(s), the ground reaction force propels therobot in the appropriate direction. The ground reaction force mayinclude a normal force component that acts perpendicular to the groundsurface. In some cases, the ground reaction force may also include afriction force component that acts parallel to the ground surface.

By controlling the actuation and position of its leg(s), the robot maycontrol the forces it exerts on the ground, and thereby control theground reaction forces that act upon the robot. Controlling the groundreaction forces may allow the robot to control its position, velocity,and acceleration, and to move at a desired gait while maintaining itsbalance. Further, control of the ground reaction forces may allow therobot to correct errors that the robot might detect in its gait. Forexample, the robot may detect unintended lateral velocity in the robot'sgait based on contact with an obstacle, among other causes. In response,the robot may determine a position and load for its leg(s) that causes aground reaction force to act upon the robot that opposes and correctsthe velocity error. Similarly, the robot may detect an unintendedrotation about its roll axis and cause a ground reaction force to actupon the robot to correct the roll error. Other types of errors andcorrections are also possible.

This manner of ground reaction force control may further be utilized toavoid slips of a robot's feet. In some examples, the robot may determinea value for a coefficient of friction between its feet and the groundsurface, and a value for the gradient of the ground surface. Thesevalues may be used to further determine a threshold orientation for agiven ground reaction force, defining the maximum friction force basedon its direct relationship to the normal force.

The threshold orientation may be approximated by a cone centered on thenormal force and pointed perpendicular to the ground surface. Thus, aground reaction force outside of the friction cone would require morefriction than is available, and may result in a slip of the robot'sfoot. Accordingly, when the robot determines a target ground reactionforce for a given foot, it may adjust the orientation of the targetground reaction force to be within the allowable friction cone.

In some cases, the robot may determine two different thresholdorientations for the ground reaction force during the same step. Forexample, the robot may use a smaller friction cone during the earlystages of a step, requiring less friction and allowing the robot toestablish its foothold. The robot may then expand the friction conelater in the step, allowing the robot to adjust the orientation of theground reaction force to seek more friction from the ground surface.

An example robot may be configured to detect when slips of its feetoccur. For instance, some robots may have two feet on the ground at thesame time for a given gait, such as a quadruped robot that is moving ata trotting gait. The robot may, via sensors in its legs, be able todetermine the positions of its feet. Based on this determination, therobot may be able to further determine the distance between its feetduring a given step. If the feet maintain ground contact and do notslip, the distance between them should not change. Thus, the robot maymonitor the distance between the pair of feet throughout the step, andany deviation from the starting distance that exceeds a certainthreshold may indicate that a significant slip has occurred, and therobot may react accordingly.

Other methods of detecting slips of a robot's foot are possible as well.For instance, the robot may compare two different estimates of theposition of the robot's body. The first estimate may determine theposition of the robot's body in relation to a foot based on kinematicodometry. If it is assumed that the foot is in continuous contact withthe ground and does not slip, then the position of the robot's body withrespect to the foot may approximate the body's position with respect tothe ground.

The second estimate may be based on an inertial measurement of therobot's body, without regard to the stance position of the robot's foot.When the two estimates, determined at approximately the same time(s),are compared, they may be approximately equal if the assumptionunderlying the first estimate is true. If the estimates differ by anamount greater than a certain threshold, it may indicate that theassumption is not true, and that a significant slip of the robot's footmay have occurred. The robot may react accordingly. Further, a robot mayutilize either or both of the methods for detecting slips describedherein, among other techniques.

Some robots may operate in gaits that control the state changes of thelegs of the robot based on a timer. For instance, a biped robot mayoperate in a timer-based walking gait where the feet of the robotcontact the ground surface and remain in the stance state for one-halfof a second, then lift off of the ground and swing forward for one-halfof a second before stepping down again. Alternatively, an example robotmay operate in a gait that is at least partially mechanically timed. Forinstance, the robot may determine when to end a given state of therobot's foot based on data that is received by the robot. As an example,the robot may determine when to end a stance state for a first footbased on an indication that a second foot that was previously in a swingstate has made contact with the ground surface. Other indications thatcause the robot to change states may be possible.

Further, an example robot operating in a mechanically timed gait mayreact in various ways to handle disturbances to the gait. A slip of therobot's foot might be one type of disturbance. Another might be anindication that a stance leg has reached a range of motion limit of anactuator in one of its joints, limiting the actuator's range of movementand possibly limiting its control of the robot's gait. For example, therobot may cause a swinging leg to end its swing early and make contactwith the ground surface if the robot detects a disturbance to a stanceleg.

As another example, the robot may react to an indication that a leg in aswing state has contacted the ground surface earlier than anticipatedbased on a target swing trajectory that was determined for the foot.This may occur relatively frequently when the robot encounters uneventerrain, and may indicate that the robot is beginning to walk up anincline, or surmount an obstacle. The robot may adjust its gait, amongother possible reactions, to compensate for the early ground contact.

In other examples, the robot may react to an indication that a leg in aswing state has not contacted the ground surface within an anticipatedtime. The anticipated time may be based on the target swing trajectorythat was determined for the foot. Again, this may occur relativelyfrequently when the robot encounters uneven terrain, and may indicatethat the robot is beginning to walk down an incline, or has stepped offof a ledge. The robot may adjust its gait, among other possiblereactions, to compensate for the late ground contact.

II. Example Robotic Systems

Referring now to the figures, FIG. 1 illustrates an exampleconfiguration of a robotic system. The robotic system 100 represents anexample robotic system configured to perform the methods describedherein. Additionally, the robotic system 100 may be configured tooperate autonomously, semi-autonomously, and/or using directionsprovided by user(s), and may exist in various forms, such as a humanoidrobot or a quadruped robot, among other examples. Furthermore, therobotic system 100 may also be referred to as a robotic device, mobilerobot, or robot, among others.

As shown in FIG. 1, the robotic system 100 may include processor(s) 102,data storage 104, program instructions 106, and controller(s) 108, whichtogether may be part of a control system 118. The robotic system 100 mayalso include sensor(s) 112, power source(s) 114, mechanical components110, and electrical components 116. Note that the robotic system 100 isshown for illustration purposes as robotic system 100 and may includemore or less components within examples without departing from the scopeof the invention. The various components of robotic system 100 may beconnected in any manner, including wired or wireless connections, etc.Further, in some examples, components of the robotic system 100 may bepositioned on multiple entities rather than a single entity. Otherexample illustrations of robotic system 100 may exist as well.

Processor(s) 102 may operate as one or more general-purpose processorsor special purpose processors (e.g., digital signal processors,application specific integrated circuits, etc.). The processor(s) 102may be configured to execute computer-readable program instructions 106that are stored in the data storage 104 and are executable to providethe operations of the robotic system 100 described herein. For instance,the program instructions 106 may be executable to provide functionalityof controller(s) 108, where the controller(s) 108 may be configured tocause activation and deactivation of the mechanical components 110 andthe electrical components 116.

The data storage 104 may exist as various types of storage configured tohold memory. For example, the data storage 104 may include or take theform of one or more computer-readable storage media that can be read oraccessed by processor(s) 102. The one or more computer-readable storagemedia can include volatile and/or non-volatile storage components, suchas optical, magnetic, organic or other memory or disc storage, which canbe integrated in whole or in part with processor(s) 102. In someimplementations, the data storage 104 can be implemented using a singlephysical device (e.g., one optical, magnetic, organic or other memory ordisc storage unit), while in other implementations, the data storage 104can be implemented using two or more physical devices, which maycommunicate via wired or wireless communication. Further, in addition tothe computer-readable program instructions 106, the data storage 104 mayinclude additional data such as diagnostic data, among otherpossibilities.

The robotic system 100 may include at least one controller 108, whichmay interface with the robotic system 100. The controller 108 may serveas a link between portions of the robotic system 100, such as a linkbetween mechanical components 110 and/or electrical components 116. Insome instances, the controller 108 may serve as an interface between therobotic system 100 and another computing device. Further, the controller108 may serve as an interface between the robotic system 100 and auser(s). The controller 108 may include various components forcommunicating with the robotic system 100, including a joystick(s),buttons, among others. The example interfaces and communications notedabove may be implemented via a wired or wireless connection, or both.The controller 108 may perform other functions for the robotic system100 as well. Other examples of controllers may exist as well.

Mechanical components 110 represent possible hardware of the roboticsystem 100 that may enable the robotic system 100 to operate and performphysical operations. As a few examples, the robotic system 100 mayinclude actuator(s), extendable leg(s) (“legs”), arm(s), wheel(s), oneor more structured bodies for housing the computing system or othercomponents, and other mechanical components. The mechanical components110 may depend on the design of the robotic system 100 and may also bebased on the functions and/or tasks the robotic system 100 may beconfigured to perform. As such, depending on the operation and functionsof the robotic system 100, different mechanical components 110 may beavailable for the robotic system 100 to utilize. In some examples, therobotic system 100 may be configured to add and/or remove mechanicalcomponents 110, which may involve assistance from a user and/or otherrobot. For example, the robotic system 100 may be initially configuredwith four legs, but may be altered by a user or the robotic system 100to remove two of the four legs to operate as a biped. Other examples ofmechanical components 110 may be included within some implementations.

Additionally, the robotic system 100 may include one or more sensor(s)112 arranged to sense aspects of the robotic system 100. The sensor(s)112 may include one or more force sensors arranged to measure load onvarious components of the robotic system 100. In an example, thesensor(s) 112 may include one or more force sensors on each leg. Suchforce sensors on the legs may measure the load on the actuators thatmove one or more members of the leg.

The sensor(s) 112 may further include one or more position sensors.Position sensors may sense the position of the actuators of the roboticsystem. In one implementation, position sensors may sense the extension,retraction, or rotation of the actuators on the legs of the robot. Thesensor(s) 112 may further include one or more velocity and/oracceleration sensors. For instance, the sensor(s) 112 may include aninertial measurement unit (IMU). The IMU may sense velocity andacceleration in the world frame, with respect to the gravity vector. Thevelocity and acceleration of the IMU may then be translated to therobotic system, based on the location of the IMU in the robotic systemand the kinematics of the robotic system. Other sensor(s) 112 are alsopossible, including proximity sensors, motion sensors, load sensors,touch sensors, depth sensors, ultrasonic range sensors, and infraredsensors, among other possibilities.

The sensor(s) 112 may provide sensor data to the processor(s) 102 toallow for appropriate interaction of the robotic system 100 with theenvironment as well as monitoring of operation of the systems of therobotic system 100. The sensor data may be used in evaluation of variousfactors for activation and deactivation of mechanical components 110 andelectrical components 116 by controller 108 and/or a computing system ofthe robotic system 100.

The sensor(s) 112 may provide information indicative of the environmentof the robot for the controller 108 and/or computing system to use todetermine operations for the robotic system 100. For example, thesensor(s) 112 may capture data corresponding to the terrain of theenvironment or location of nearby objects, which may assist withenvironment recognition and navigation, etc. In an exampleconfiguration, the robotic system 100 may include a sensor system thatincludes RADAR, LIDAR, SONAR, VICON®, one or more cameras, a globalpositioning system (GPS) transceiver, and/or other sensors for capturinginformation of the environment of the robotic system 100. The sensor(s)112 may monitor the environment in real-time and detect obstacles,elements of the terrain, weather conditions, temperature, and/or otherparameters of the environment for the robotic system 100.

Further, the robotic system 100 may include other sensor(s) 112configured to receive information indicative of the state of the roboticsystem 100, including sensor(s) 112 that may monitor the state of thevarious components of the robotic system 100. The sensor(s) 112 maymeasure activity of systems of the robotic system 100 and receiveinformation based on the operation of the various features of therobotic system 100, such the operation of extendable legs, arms, orother mechanical and/or electrical features of the robotic system 100.The sensor data provided by the sensors may enable the computing systemof the robotic system 100 to determine errors in operation as well asmonitor overall functioning of components of the robotic system 100. Forexample, the computing system may use sensor data to determine astability of the robotic system 100 during operations as well asmeasurements related to power levels, communication activities,components that require repair, among other information. As an exampleconfiguration, the robotic system 100 may include gyroscope(s),accelerometer(s), and/or other possible sensors to provide sensor datarelating to the state of operation of the robot. Further, sensor(s) 112may also monitor the current state of a function, such as a gait, thatthe robotic system 100 may currently be operating. Other example usesfor the sensor(s) 112 may exist as well.

Additionally, the robotic system 100 may also include one or more powersource(s) 114 configured to supply power to various components of therobotic system 100. Among possible power systems, the robotic system 100may include a hydraulic system, electrical system, batteries, and/orother types of power systems. As an example illustration, the roboticsystem 100 may include one or more batteries configured to providecharge to components that may receive charge via a wired and/or wirelessconnection. Within examples, components of the mechanical components 110and electrical components 116 may each connect to a different powersource or may be powered by the same power source. Components of therobotic system 100 may connect to multiple power sources 114 as well.

Within example configurations, any type of power source may be used topower the robotic system 100, such as a gasoline engine. Further, thepower source(s) 114 may charge using various types of charging, such aswired connections to an outside power source, wireless charging,combustion, or other examples. Additionally, the robotic system 100 mayinclude a hydraulic system configured to provide power to the mechanicalcomponents 110 using fluid power. Components of the robotic system 100may operate based on hydraulic fluid being transmitted throughout thehydraulic system to various hydraulic motors and hydraulic cylinders,for example. The hydraulic system of the robotic system 100 may transfera large amount of power through small tubes, flexible hoses, or otherlinks between components of the robotic system 100. Other power sourcesmay be included within the robotic system 100 within examples.

The electrical components 116 may include various components capable ofprocessing, transferring, providing electrical charge or electricsignals, for example. Among possible examples, the electrical components116 may include electrical wires, circuitry, and/or wirelesscommunication transmitters and receivers to enable operations of therobotic system 100. The electrical components 116 may interwork with themechanical components 110 to enable the robotic system 100 to performvarious functions. The electrical components 116 may be configured toprovide power from the power source(s) 114 to the various mechanicalcomponents 110, for example. Further, the robotic system 100 may includeelectric motors. Other examples of electrical components 116 may existas well.

FIG. 2 illustrates an example quadruped robot 200, according to anexample implementation. Among other possible functions, the robot 200may be configured to perform some of the methods described herein duringoperation. The robot 200 includes a control system 202, legs 204 a, 204b, 204 c, 204 d connected to a body 208. Each leg may include a foot 206a, 206 b, 206 c, 206 d, that may contact the ground surface. The robot200 may also include sensors (e.g., sensor 210) configured to providesensor data to the control system 202 of the robot 200. Further, therobot 200 is illustrated carrying a load 212 on the body 208. Withinother example implementations, the robot 200 may include more or lesscomponents and may additionally include components not shown in FIG. 2.

The robot 200 may be a physical representation of the robotic system 100shown in FIG. 1 or may be based on other configurations. To operate, therobot 200 includes a computing system that may be made up of one or morecomputing devices configured to assist in various operations of therobot 200, which may include processing data and providing outputs basedon the data. The computing system may process information provided byvarious systems of the robot 200 (e.g., a sensor system) or from othersources (e.g., a user, another robot, a server) and may provideinstructions to the systems to operate in response.

Additionally, the computing system may monitor systems of the robot 200during operation, to determine errors and/or monitor regular operation,for example. In some example configurations, the computing system mayserve as a connection between the various systems of the robot 200 thatcoordinates the operations of the systems together to enable the robot200 to perform functions. Further, although the operations and methodsdescribed herein correspond to a computing system of a robot performingtasks, the computing system may be made of multiple devices, processors,controllers, and/or other entities configured to assist in the operationof the robot. Additionally, the computing system may operate usingvarious types of memory and/or other components.

Although the robot 200 includes four legs 204 a-204 d in theillustration shown in FIG. 2, the robot 200 may include more or lesslegs within other examples. Further, the configuration, position, and/orstructure of the legs 204 a-204 d may vary in example implementations.The legs 204 a-204 d enable the robot 200 to move and may be configuredto operate in multiple degrees of freedom to enable different techniquesof travel to be performed. In particular, the legs 204 a-204 d mayenable the robot 200 to travel at various speeds through mechanicallycontrolling the legs 204 a-204 d according to the mechanics set forthwithin different gaits. A gait is a pattern of movement of the limbs ofan animal, robot, or other mechanical structure. As such, the robot 200may navigate by operating the legs 204 a-204 d to perform various gaitsthat the robot 200 is configured to perform. The robot 200 may use avariety gaits to travel within an environment, which may involveselecting a gait based on speed, terrain, the need to maneuver, and/orenergy efficiency.

Further, different types of robots may use different gaits due todifferences in design that may prevent use of certain gaits. Althoughsome gaits may have specific names (e.g., walk, trot, run, bound,gallop, etc.), the distinctions between gaits may overlap with somegaits having slight variations. The gaits may be classified based onfootfall patterns, also known as the locations on the ground surface forthe placement the feet 206 a-206 d. Similarly, gaits may also beclassified based on mechanics. One or more systems of the robot 200,such as the control system 118, may be configured to operate the legs204 a-204 d to cause the robotic 200 to move. Additionally, the robot200 may include other mechanical components, which may be attached tothe robot 200 at various positions. The robot 200 may include mechanicalarms, grippers, or other features. In some examples, the legs 204 a-204d may have other types of mechanical features that enable control uponvarious types of surfaces that the robot may encounter, such as wheels,etc. Other possibilities also exist.

As part of the design of the example robot 200, the body 208 of therobot 200 connects to the legs 204 a-204 d and may house variouscomponents of the robot 200. As such, the structure of the body 208 mayvary within examples and may further depend on particular functions thata given robot may have been designed to perform. For example, a robotdeveloped to carry heavy loads may have a wide body that enablesplacement of the load. Similarly, a robot designed to reach high speedsmay have a narrow, small body that does not have substantial weight.Further, the body 208 as well as the legs 204 may be developed usingvarious types of materials, such as various metals or plastics. Withinother examples, a robot may have a body with a different structure ormade of other types of materials.

The sensor(s) 210 of the robot 200 may include various types of sensors,such as the camera or sensing system shown in FIG. 2. The sensor(s) 210is positioned on the front of the body 208, but may be placed at otherpositions of the robot as well. As described for the robotic system 100,the robot 200 may include a sensory system that includes force sensors,positions sensors, IMUs, RADAR, LIDAR, SONAR, VICON®, GPS, forcesensors, accelerometer(s), gyroscope(s), and/or other types of sensors.The sensor(s) 210 may be configured to measure parameters of theenvironment of the robot 200 as well as monitor internal operations ofsystems of the robot 200. As an example illustration, the robot 200 mayinclude sensors that monitor the accuracy of its systems to enable thecomputing system to detect a system within the robot 100 that may beoperating incorrectly. Other uses of the sensor(s) 210 may be includedwithin examples.

The load 212 carried by the robot 200 may represent, various types ofcargo that the robot 200 may transport. The load 212 may also representexternal batteries or other types of power sources (e.g., solar panels)that the robot 200 may utilize. The load 212 represents one example usefor which the robot 212 may be configured. The robot 200 may beconfigured to perform other operations as well.

Additionally, as shown with the robotic system 100, the robot 200 mayalso include various electrical components that may enable operation andcommunication between the mechanical features of the robot 200. Also,the robot 200 may include one or more computing systems that include oneor more processors configured to perform various functions, includingprocessing inputs to provide control over the operation of the robot200. The computing system may include additional components, such asvarious types of storage and a power source, etc.

During operation, the computing system may communicate with othersystems of the robot 200 via wired or wireless connections and mayfurther be configured to communicate with one or more users of therobot. As one possible illustration, the computing system may receive aninput from a user indicating that the user wants the robot to perform aparticular gait in a given direction. The computing system may processthe input and may perform an operation that may cause the systems of therobot to perform the requested gait. Additionally, the robot'selectrical components may include interfaces, wires, busses, and/orother communication links configured to enable systems of the robot tocommunicate.

Furthermore, the robot 200 may communicate with one or more users and/orother robots via various types of interfaces. In an exampleimplementation, the robot 200 may receive input from a user via ajoystick or similar type of interface. The computing system may beconfigured to measure the amount of force and other possible informationfrom inputs received from a joystick interface. Similarly, the robot 200may receive inputs and communicate with a user via other types ofinterfaces, such as a mobile device or a microphone. The computingsystem of the robot 200 may be configured to process the various typesof inputs that the robot 200 may receive.

FIG. 3 illustrates another example quadruped robot, according to anexample implementation. Similar to robot 200 shown in FIG. 2, the robot300 may correspond to the robotic system 100 shown in FIG. 1. The robot300 serves as another possible example of a robot that may be configuredto avoid slips of the robot's feet, detect slips that occur, and handleand/or respond to slips and other disturbances to a gait of the robot.Other examples of robots may exist.

FIG. 4 illustrates an example of a biped robot according to anotherexample implementation. Similar to robots 200 and 300 shown in FIGS. 2and 3, the robot 400 may correspond to the robotic system 100 shown inFIG. 1. The robot 400 serves as another possible example of a robot thatmay be configured to avoid slips of the robot's feet, detect slips thatoccur, and handle and/or respond to slips and other disturbances to agait of the robot. Other examples of robots may exist.

III. Example Implementations for Controlling a Legged Robot

Example implementations are discussed below for controlling an examplelegged robot. The control of the legged robot may include avoiding slipsof the robot's foot when the foot is in contact with the ground surface.The control may further include detecting slips of the robot's foot whena slip occurs. Still further implementations are discussed for handlingand/or responding to slips and other disturbances that may affect thegait of the robot, particularly when the robot encounters varying typesof ground surfaces and terrain.

Further, the term ground surface as used herein is meant to encompassany possible surfaces and terrain that the robot may encounter, and isnot meant to be limiting. For instance, the ground surface may beindoors or outdoors, may be rigid or loose, such as sand or gravel, andmay include discontinuities or irregularities such as stairs, rocks,fallen trees, debris, and the like. Numerous other examples exist.

Flow charts 500, 700, 900, 1100, 1300, and 1500 shown in FIGS. 5, 7, 9,11, 13, and 15 respectively, present example operations that may beimplemented by a robot, such as the example robot 200 shown in FIG. 2 orthe example robot 400 shown in FIG. 4. Flow charts 500, 700, 900, 1100,1300, and 1500 may include one or more operations or actions asillustrated by one or more of blocks shown in each figure. Although theblocks are illustrated in sequential order, these blocks may also beperformed in parallel, and/or in a different order than those describedherein. Also, the various blocks may be combined into fewer blocks,divided into additional blocks, and/or removed based upon the desiredimplementation.

In addition, the flow charts 500, 700, 900, 1100, 1300, and 1500 andother operations disclosed herein provide the operation of possibleimplementations. In this regard, each block may represent a module, asegment, or a portion of program code, which includes one or moreinstructions executable by a processor for implementing specific logicaloperations. The program code may be stored on any type of computerreadable medium, for example, such as a storage device including a diskor hard drive. In addition, each block may represent circuitry that iswired to perform the specific logical operations.

A. Example Implementations for Slip Avoidance

FIG. 5 is a flowchart 500 illustrating operations for avoiding slips ofa robot's foot. The robot may be a biped robot with two feet, aquadruped robot with four feet, among other examples. Further, theseoperations may be performed by a robot that is walking, trotting, orrunning. Other gaits are also possible.

At block 502, a robot having at least one foot may determine arepresentation of a coefficient of friction (μ) between the foot and aground surface. FIG. 6A depicts an example foot 602 of a robot, such asthe robot 200 shown in FIG. 2, in contact with a ground surface 604. Insome cases, the determined representation of μ might not estimate theactual, or “true” value of the coefficient. Rather, the robot 200 maydetermine a representation of μ that is within a probable range and thenadjust the representation as necessary as the robot 200 walks on theground surface. For instance, the robot 200 may initially determine arepresentation of μ within a range of 0.4 to 0.6, representing acoefficient of friction between the robot's foot 602 and many commonlyencountered types of ground surfaces. The robot 200 may then adjust thatinitial value either upward or downward based on any number of factors.For example, the robot 200 may increase or decrease the representationof μ based on the frequency that slips are detected of the robot's foot602. Other examples are also possible.

At block 504, the robot 200 may determine a representation of a gradientof the ground surface. The determined representation of the gradient maybe expressed as an angle, α, as shown in FIG. 6A. In some cases, thegradient of the ground surface may approximated by a plane, which mayinclude an angle of inclination in both the forward and lateraldirections of the robot 200. The robot 200 may base its determination ofthe gradient on data received from sensors of the robot 200. Forexample, the detected ground reaction forces on one or more feet 602 ofthe robot 200 may indicate that the ground surface 604 is notperpendicular to the gravity vector. Further, one or more IMUs of therobot 200 may determine that the height of the robot's body (i.e., theheight of the IMU) has changed relative to the z-axis, indicating thatthe robot 200 may be moving along an inclined surface. Additionally oralternatively, the robot 200 may base the representation of the gradienton data received from a LIDAR, stereoscopic vision, or other spatialrecognition system. Other examples are also possible.

At block 506, based on the determined representations of the coefficientof friction and the slope, the robot 200 may determine a thresholdorientation for a target ground reaction force on the foot 602 of therobot 200 during a step. A given ground reaction force may include botha normal force component 606, F_(n), perpendicular to the ground surface604, and a friction force component 608, F_(f), parallel to the groundsurface 604. The friction force is limited by the coefficient offriction, μ, according to the equation:

F _(f) ≤μF _(n)

Accordingly, the threshold orientation may indicate an angle ofincidence for the given ground reaction force at which the frictionforce 608 reaches its maximum value with respect to the normal force606, based on the determined μ. This may be referred to as the frictionangle. In other words, a ground reaction force outside of the thresholdorientation (i.e., exceeding the friction angle in any direction) wouldrequire a greater friction force component than is possible, and mayresult in a slip of the foot 602.

As shown in FIG. 6A, the threshold orientation 610 may be geometricallyapproximated by a cone, or “friction cone.” The friction cone includes acenter axis 612, and is oriented such that the center axis 612 isperpendicular to the ground surface 604 and aligned with the normalforce 606. The radius of the friction cone is based on the angle offriction defining the cone, which is based on the determined value of μ.

At block 508, the robot 200 may determine the target ground reactionforce, where the target ground reaction force includes a magnitude andan orientation. A target ground reaction force may be determined basedon numerous factors. For example, the robot 200 may determine the targetground reaction force based on the force that may be required tomaintain the current gait of the robot. The determination mayadditionally be based on the sensor data regarding the robot's positionand velocity, indications that the robot may receive regardingdisturbances to the robot's gait, among other possibilities.

Accordingly, the robot 200 may determine a target ground reaction forcethat, when it acts upon the robot 200, may support the robot's weight,move the robot in a given direction, maintain the robot's balance,and/or correct a velocity or position error that has been detected,among other examples. Further, the target ground reaction force may bedetermined and updated continuously throughout a given step of the robot200, and may vary depending on the sensor data received by the robot200. As shown in FIG. 6A, the target ground reaction force 614 may berepresented by vector that includes both a magnitude and an orientation.In this example, the target ground reaction force 614 lies outside thethreshold orientation 610 represented by the friction cone, and mayresult in a slip of the robot's foot 602.

In some examples, it may be desirable to limit the orientation of thetarget ground reaction force in a given direction more than others. Forexample, in some cases, errors to a robot's forward-moving gait thatoccur in the lateral (y-axis) direction may be more difficult for therobot to correct than errors in the forward (x-axis) direction. Thus,similarly, a roll error (rotation about the x-axis) may be moredifficult for some robots to correct than a pitch error (rotation aboutthe y-axis). Consequently, the robot may determine a more limitedthreshold orientation in the lateral direction, in order to moveconservatively avoid lateral slips that may lead to lateral velocityerrors or roll errors.

Therefore, in some implementations, the determined μ may represent thecoefficient of friction in the forward direction, μ_(x), and the robotmay determine a smaller representation, μ_(y), in the lateral direction.For instance, the robot may determine μ_(y) to be a fraction of μ_(x),such as one half of μ_(x). Other fractions, and other examples of howthe robot may determine μ_(y) are also possible.

The resulting threshold orientation may be geometrically approximated bya stretched cone in which a cross-section of the stretched cone may berepresented by an ellipse, rather than a circle. FIG. 6B illustrates atop view of an example of a first threshold orientation 610 a,determined based on the same value of μ in both the x and y directions,as well as a top view of a second threshold orientation 610 b,determined based different values determined for μ_(x) and μ_(y).

At block 510, the robot may determine an adjusted ground reaction forceby adjusting the orientation of the target ground reaction force to bewithin the determined threshold orientation 610. For example, adjustingthe orientation of the target ground reaction force 614 may includereducing the friction force component and increasing the normal forcecomponent of the target ground reaction force 614. As a result, as shownin FIG. 6A, the adjusted ground reaction force 616 is within thethreshold orientation 610. Accordingly, the adjusted ground reactionforce 616 includes a friction component 608 that is less than themaximum friction force, and thus may avoid a slip of the robot's foot602. In some cases where the target ground reaction force 614 is updatedcontinuously throughout a given step, the robot may determine anadjusted ground reaction force 616 for each update to the target groundreaction force 614.

In some cases, the target ground reaction force 614 might not be outsidethe threshold orientation 610 for a given step of the robot, and thusthe robot 200 may determine an adjusted ground reaction force 616 thatis equal to the target ground reaction force 614. Alternatively, in someimplementations the robot 200 may include programming for comparing theorientation of the target ground reaction force 614 to the thresholdorientation 610 and determining if the target ground reaction force 614lies outside of the threshold. If the robot 200 determines that it doesnot, it might not perform the step of determining an adjusted groundreaction force 616.

At block 512, the robot 200 may cause the foot 602 of the robot 200 toapply a force to the ground surface 604 approximately equal to andopposing the adjusted ground reaction force 616 during the step. Thismay result in the adjusted ground reaction force 616 being applied tothe robot 200 by the ground surface 604, as desired. For example, therobot 200 may determine the adjusted ground reaction force 616 while thefoot 602 is in a swinging state, before it contacts the ground. Therobot 200 may then cause the foot 602 to make contact with the ground atthe force approximately equal to and opposing the adjusted groundreaction force. In some examples, the robot 200 may maintain theorientation of the applied force for the duration of the step, until thefoot lifts off of the ground surface 604 again.

Alternatively, the robot may determine a second threshold orientationand a second adjusted ground reaction force during a given step. Forexample, it may be desirable to determine a more conservative, firstrepresentation of μ in the early stages of a given step, which may beexpressed as μ₁. For instance, after the foot 602 of the robot 200initially makes contact with the ground surface 604, the ground surface604 may compress and/or conform to the foot 602. This may increase thetraction, i.e., the coefficient of friction and the available frictionforce, between the foot 602 and the ground surface 604. Accordingly, atblock 514, the robot 200 may determine a second representation of thecoefficient of friction, μ₂, between the foot 602 and the ground surface604, wherein the second representation μ₂ is greater than the firstrepresentation μ₁.

At block 516, the robot 200 may, based on the determined μ₂ and thedetermined representation of the gradient, determine a second thresholdorientation for the target ground reaction force on the foot 602 duringthe step. Because μ₂ is greater than the second threshold orientationmay be larger than the first. For instance, FIG. 6C shows the examplefriction cone representing the first threshold orientation 610, as wellas a larger cone representing the second threshold orientation 618.

The robot 200 may increase the representation from μ₁ to μ₂, and thusthe size of the friction cone, at any point during a given step, and maydo so continuously and smoothly throughout the step. In some cases, therobot 200 may determine the second threshold orientation after adetermined time period during the step. For instance, the step may havean estimated duration, such as one second. The robot 200 may determinethe estimated duration of the step based on one or more of a defaultvalue, the gait of the robot, data received from sensors, among otherexamples. The robot 200 may then determine the time period to beapproximately one half of the estimated duration (i.e., one half of asecond). Thus, the size of friction cone may begin at the firstthreshold orientation, and then increase gradually until it fullyexpands to the second threshold orientation half-way through the step.Other time periods, such as, for instance, the entire duration of thestep, as well as other methods for determining a second thresholdorientation for the second target ground reaction force on the foot ofthe robot during the step, are also possible.

At block 518, the robot 200 may determine a second target groundreaction force having a magnitude and an orientation. The second targetground reaction force may be determined based on any of the factorsnoted above with respect to block 508, among other factors. As shown inFIG. 6C, the second target ground reaction force 615 may be representedby vector that includes both a magnitude and an orientation. In thisexample, the second target ground reaction force 615 lies outside thesecond threshold orientation 618 represented by the friction cone, andmay result in a slip of the robot's foot 602.

At block 520, the robot 200 may determine a second adjusted groundreaction force by adjusting the orientation of the second target groundreaction force 615 to be within the determined second thresholdorientation 618. FIG. 6C shows the second adjusted ground reaction force620, which includes a larger friction component than the first adjustedground reaction force 616. Because the threshold orientation may becontinuously updated from the first to the second orientations, and thetarget ground reaction force may be continuously updated between thefirst and second forces, the robot 200 may also continuously determinethe adjusted ground reaction forces.

In some cases, the second target ground reaction force 615 might not beoutside the second threshold orientation 618 for a given step of therobot 200, and thus the robot 200 may determine a second adjusted groundreaction force 620 that is the target ground reaction force 615.

At block 522, after causing the foot 602 to apply the first force on theground surface 604 approximately equal to and opposing the firstadjusted ground reaction force 616 during the step, the robot 200 maycause the foot 602 to apply a second force on the ground surface 604approximately equal to and opposing the second adjusted ground reactionforce 620 during the step. For example, the robot 200 may adjust theorientation of the first applied force during the step, in order applythe second force approximately equal to and opposing the second adjustedground reaction force. Further, just as the robot 200 may continuouslyupdate the adjusted ground reaction force during the step as notedabove, the robot 200 may continuously update the force that it causesthe foot to apply to the ground surface.

In some examples, the robot 200 may detect an indication of an increasein the gradient of the ground surface 604 and, based on the indication,determine the second coefficient of friction μz as discussed above. Aninclined ground surface, such as the ground surface 604 shown in FIGS.6A, 6C and 6D may require ground reaction force with a larger frictioncomponent in order for the robot 200 to ascend the incline.

In another example, the robot 200 may encounter an incline and adjustthe geometry of the threshold orientation 610 during the step, ratherthan determining a second threshold based on a new representation of Forinstance, based on a detected indication of an increase in the gradientof the ground surface 604, the robot may determine an adjusted thresholdorientation such that the center axis 612 of the cone approximating thethreshold orientation 610 approaches the gravity vector. The robot 200may then determine a second adjusted ground reaction force 628 byadjusting the orientation of the second target ground reaction force 615to be within the adjusted threshold orientation.

As shown in FIG. 6D, the unadjusted threshold orientation 610 is shown,as above, along with the target ground reaction force 614 and the firstadjusted ground reaction force 616 within the friction cone. Theadjusted threshold orientation 622 is also shown, which is determined byrotating the friction cone about its tip such that the adjusted centeraxis 624 approaches the gravity vector 626. The determined secondadjusted ground reaction force 628 is shown within the limits of theadjusted threshold orientation 622. Accordingly, after causing the foot602 to apply the first force on the ground surface 604 approximatelyequal to and opposing the first adjusted ground reaction force 616during the step, the robot 200 may cause the foot 602 to apply a secondforce on the ground surface 604 approximately equal to and opposing thesecond adjusted ground reaction force 628 during the step.

In yet another example, the robot 200 may adjust the friction coneduring a step based on an indication that a second foot of the robot 602has slipped. For instance, in some cases it may be desirable to shrinkthe friction cone in the initial stages of a step after a slip has beendetected. This may help to prevent consecutive slips and a potentiallyescalating number of velocity and/or rotational errors in the robot'sgait.

Thus, after determining μ₁, the threshold orientation 610, and the firstadjusted ground reaction force 616, the robot 200 may detect anindication of a slip of a second foot of the robot. Based on thedetected indication, the robot may determine a second frictioncoefficient, μ₂, that is less than the first representation, μ1. Forexample, the robot 200 may reduce the coefficient of friction toone-sixth of its original value. Other examples are also possible.

The robot 200 may further determine a second, smaller thresholdorientation and a second adjusted ground reaction force as noted above.Then, before causing the foot 602 to apply the first force on the groundsurface 604 approximately equal to and opposing the first adjustedground reaction force 616, the robot 200 may cause the foot 602 to applya second force on the ground surface 604 approximately equal to andopposing the second ground reaction force. By causing the foot 602 toapply the second force on the ground surface 604 in the initial stagesof the step, the robot 200 may decrease the likelihood of a slip of foot602.

B. Example Implementations for Slip Detection

1. First Example Implementation for Slip Detection

FIG. 7 is a flowchart 700 illustrating operations for detecting slips ofa robot's foot. The operations of flowchart 700 may be utilized by arobot that has two feet in contact with the ground, or in “stance,” fora given time period, such as the duration of a step.

At block 702, a robot comprising a set of sensors may determine, basedon first data received from the set of sensors, a first distance betweena pair of feet of the robot that are in contact with a ground surface ata first time. The robot may be, for example, a quadruped robot such asthe robot 200 shown in FIG. 2.

The pair of feet between which the first distance is measured mayinclude the opposite feet on either side of the robot 200—such as theleft front and the right rear foot. For some gaits of the robot 200,such as a trotting gait, these feet may contact the ground surface forapproximately the same time period during a given step. FIG. 8Aillustrates an example of the robot 200 in a trotting gait at time 1,with its left front foot 802 a and right rear foot 804 in contact withthe ground surface 806. The other feet of the robot 200, i.e., the rightfront foot 808 and the left rear foot 810, are in a “swing” state, andare not in contact with the ground surface 806. Other configurations ofthe robot's feet are possible as well.

The set of sensors may include position sensors in the legs of the robot200. The sensors may detect and relay position and velocity data to acontrol system, and possibly other systems, of the robot 200. The set ofsensors may include one or more sensors 830 located in the knee jointsof the legs that detect the movements on the knee joint. The set ofsensors may also include one or more sensors 832 located in the hipjoints of the legs that detect movements of the hip joint. Other sensorsmay be included in the set of sensors, and the location of these sensorson the robot 200 may be varied.

The first distance 812 between the pair of feet in contact with theground surface 806 may be determined based on data received from thesensors of the robot 200. FIG. 8A shows, below the illustration of therobot 200, a top view of the robot's pair of feet in contact with theground surface 806. The line between the pair of feet represents thefirst distance 812 between the pair of feet at time 1.

In some examples, the pair of feet may be in a swing state beforecontacting the ground surface 806. After the robot causes both feet inthe pair of feet to make contact with the ground surface 806, the groundsurface 806 may compress and/or conform to the left front foot 802 aand/or right rear foot 804. Therefore, time 1 might not correspond tothe instant that the pair of feet makes ground contact, when smallshifting may occur and a foothold is established. Instead, the distance812 may be detected a brief period of time after contact. For example,time 1 may be within a range of 10-50 milliseconds after the pair offeet makes contact with the ground surface 806.

At block 704, the robot 200 may determine, based on second data receivedfrom the set of sensors, a second distance between the pair of feet at asecond time, where the pair of feet remains in contact with the groundsurface from the first time to the second time. FIG. 8B shows the robot200 at time 2, which may be a later time during the step shown in FIG.8A. The right front foot 808 and left rear foot 810 have swung forwardduring the step, while the left front foot 802 b and right rear foot 804(i.e., the pair of feet) remain in contact with the ground surface 806.However, as shown in the top view of FIG. 8B, the left front foot 802 bhas shifted along the x-axis, toward the rear of the robot 200. Thus,the second distance 814 between the pair of feet may be determined to beshorter than the first distance 812.

At block 706, the robot 200 may compare a difference between thedetermined first and second distances to a threshold difference. Forexample, the threshold difference may indicate the distance below whicha slip of the robot's foot may be too small to cause a significant errorto the robot's gait. Further, in some cases, the robot's potentialreaction to a determined slip may further disrupt the gait of the robot200, and therefore it may be desirable to tolerate small slips of therobot's feet and correct them in subsequent steps, rather than initiatean immediate reaction.

The threshold difference may be represented by a variable c, and may bea predetermined or default value. Further, the threshold difference cmay be different between different robot configurations (e.g., the sizeof the robot). In some cases, the threshold difference may be between 1and 50 centimeters. Other threshold differences are also possible.Further, the robot 200 may adjust c at various times based on the gaitof the robot 200, the ground surface conditions detected by the robot200, or slips or other disturbances detected by the robot 200, amongother factors.

FIG. 8C shows a top view of the pair of feet of the robot 200 at bothtime 1 and time 2. The distances 812, 814 between the feet at time 1 andtime 2 are also shown, as well as the difference 816 between the twodistances 812, 814. The robot 200 may then compare the difference 816 tothe threshold difference ϵ.

In some cases, determining the first and second distances based on asingle, scalar distance between the pair of feet may be sufficient todetect the majority of, or possibly all, slips that may occur. Forexample, the movement of the robot's feet may be constrained in one ormore directions, such as the lateral direction (y-axis), based on theconfiguration of the robot or the robot's surroundings. Further, theground surface may be a relatively flat, solid surface such that thereis little or no chance that the robot's foot may slip in the verticaldirection (z-axis). Thus, slips may be limited to a single direction(x-axis), and a single measurement of the distance between the feet willrecognize any relative movement of the feet. Other examples where asingle measurement of the distance between the pair of feet may besufficient are also possible.

However, if movement of a given foot is possible in more than onecoordinate direction, determining a single distance between the pair offeet might not recognize some potential slips. For example, the leftfront foot 802 a may slip in both the forward and lateral directions(along the x- and y-axes), such that the resulting position of the leftfront foot 802 b rotates on an arc having the right rear foot 804 at itscenter. Consequently, the distance between the pair of feet may remainthe same, despite the slip of one of the pair of feet.

Therefore, in some examples, the robot 200 may at block 702 determine afirst x-distance, a first y-distance, and a first z-distance between thepair of feet along three respective axes of a three-axis coordinatesystem at the first time. For example, returning to FIG. 8A, the topview of the robot's feet shows the x-distance 818 and the y-distance 820between the left front foot 802 a and the right rear foot 804. Becausethe ground surface 806 in FIG. 8A is flat, the pair of feet may be atthe same relative position with respect to the z-axis and there may beno z-distance between the pair of feet at time 1.

The robot 200 may further determine at block 704 a second x-distance, asecond y-distance, and a second z-distance between the pair of feetalong the three respective axes of the three-axis coordinate system atthe second time. The top view in FIG. 8B shows the x-distance 822 andthe y-distance 824 between the left front foot 802 b and the right rearfoot 804. Again, because the ground surface 806 in FIG. 8B is flat,there may be no z-distance between the pair of feet at time 2.

After determining the distances between the pair of feet in thecoordinate directions, the robot 200 may at block 706 compare thedifferences between each set of distances to a threshold differencespecific to that coordinate direction. Thus, the robot 200 may comparean x-difference between the first x-distance and the second x-distanceto an x-threshold difference, ϵ_(x), and so on for the y- andz-directions.

FIG. 8C shows the top view of the pair of feet at both time 1 and time2. The x-difference 826 is shown as well as the y-difference 828.Because no distance was detected between the pair of feet in thez-direction at either time 1 or time 2, there may be no z-difference.Further, the distances 812 and 814 shown in FIG. 8C may represent scalarquantities, unassociated with any particular direction at time 1 andtime 2. In some cases, the robot may compare the difference 816 betweenthe scalar distances to a scalar threshold difference, ϵ_(mag), inaddition to the comparisons in the three coordinate directions.

In some cases, the threshold difference ϵ may be not be equal for thedifferent coordinate directions and for the scalar distance. Forinstance, some robots and/or gaits may be relatively more sensitive toslips in the lateral direction, making it desirable to detect andaccount for smaller slips that might otherwise be ignored if the slipwas in, for instance, the forward direction. Therefore, the thresholdϵ_(y) may be smaller than ϵ_(x). Other examples are also possible.

In some examples, the robot 200 may monitor the distance(s) between thepair of feet continuously throughout a given step. For example, therobot 200 may repeat the operations of i) determining the seconddistance between the pair of feet and ii) comparing the differencebetween the determined first and second distances to the thresholddifference. The robot 200 may repeat these operations at a frequency,such as a frequency within the range of 1-1000 Hz, until the robotdetects an indication to stop repeating the operations. Otherfrequencies are also possible, and may vary for different robotconfigurations.

For instance, the robot 200 may determine an updated second distancebetween the pair of feet every five milliseconds, and may compare thedifference between each updated second distance and the first distanceto the threshold difference. When the robot's foot 802 a first begins toslip in the example shown in FIGS. 8A-8B, the difference in positionmight not be great enough to exceed the threshold difference. Every fivemilliseconds, as the foot 802 a continues to slip, the robot 200 mayagain compare the updated difference with the threshold difference. Insome examples, the robot 200 may increase or decrease the frequency atwhich the differences are updated and compared during a step, perhaps inresponse to a detected slip or other disturbance.

The robot 200 may continue repeating the operations of determining thesecond distance and comparing the difference between the second andfirst distances to the threshold difference until the robot 200 detectsan indication to stop repeating the operations. For example, the robotmay stop repeating the operations when it detects an indication that thepair of feet is no longer in contact with the ground surface. This mayindicate that the pair of feet has lifted off of the ground to enter aswinging state. Further, the robot 200 may stop repeating the operationsif detects an indication of a slip of the robot's feet that exceeds thethreshold. Other examples are also possible.

At block 708, the robot 200 may determine that the difference betweenthe first distance between the pair of feet and the second distancebetween the pair of feet exceeds the threshold difference. Thedetermination may be based on the comparison of the differences in allthree coordinate directions, and may further be based on at least one ofthe three differences exceeding the respective threshold. The robot mayadditionally or alternatively determine that the difference between thescalar distances exceeds the scalar threshold difference.

At block 710, based on the determination that the difference exceeds thethreshold difference, the robot 200 may cause itself to react. The robot200 may take one or more actions based on the determination that athreshold difference between the pair of feet has been exceeded. Forexample, the robot 200 may generate an indication of slip. Theindication may be sent to systems within the robot 200 that may furtherrespond to the slip or log the indication, among other examples.

Further, the robot may include a third foot that is not in contact withthe ground surface, and may cause the third foot to make contact withthe ground surface based on the threshold being exceeded. For example, aslip may occur relatively early in a step, shortly after the pair offeet of the robot are in stance. In such an example, a positional orrotational error in the robot's gait that was introduced by the slip maycontinue to accelerate until the swinging leg(s) complete their swingtrajectory and make ground contact. However, in some situations,depending on the severity of the slip, the error may have grown toolarge for the new stance feet to arrest the error via ground reactionforce control.

Therefore, it may be desirable for the third foot to end its swing earlyin order to more quickly make contact with the ground surface andreestablish ground reaction force control. For example, the robot 200shown in FIGS. 8A-8B includes both a third foot 808 and a fourth foot810. Based on the determination that the threshold was exceeded, therobot 200 may cause one or both of the feet 808, 810 to end their swingstate and make early contact with the ground surface 806.

In some cases, the rapid step down of a foot that ends its swing earlybased on a detected slip may result in a relatively hard contact withthe ground surface. This may lead to the detection of additional slips,particularly where the terrain is relatively loose, such as sand. Thismay result in another rapid step of the robot, and thus a cycle of slipdetections and reactions. Thus, in some cases, the robot's reaction tothe initial determination that the threshold has been exceeded (i.e., aslip) may additionally or alternatively include increasing thethreshold.

For example, the robot 200 may incrementally increase the thresholddifference such that a subsequent slip must be more severe than theinitial slip, i.e., the difference between the detected distancesbetween the pair of feet must be greater than the initial slip for therobot to react. This may include increasing one or more of ϵ_(x), ϵ_(y),ϵ_(z), or ϵ_(mag). The robot 200 may maintain the increased thresholddifference for a predetermined period of time, or a predetermined numberof steps of the robot, so long as no additional slips are detected.Other examples are also possible.

Further, the robot 200 may react to slips that occur in each coordinatedirection in a different way. For a slip detected in a given direction,the reaction of the robot 200 may include any of the reactions notedabove, or other possible reactions, alone or in combination.

Because the method 700 analyzes the relative distance between a pair offeet, detecting a slip according to method 700 might not indicate whichfoot in the pair is the source of the slip, or whether both feetslipped. In some cases, however, this information might not benecessary, depending on the particular robot, gait, or activity of therobot.

In other cases, it may be desirable to determine which foot in the pairof feet caused the detection of a slip. Further, the gaits of somerobots might call for two feet of the robot to contact the groundtogether only briefly, or perhaps not at all, such as a biped robot inan example walking gait. Thus, some robots might alternatively oradditionally determine slips by other methods.

2. Second Example Implementation for Slip Detection

FIG. 9 is a flowchart 900 illustrating operations for detecting slips ofa robot's foot. At block 902, a robot may determine, based on first datafrom a first set of sensors, a first estimate of a distance travelled bya body of the robot in a time period. The first estimate may be based ona foot of the robot that is in contact with a ground surface. Forexample, the robot may be a quadruped robot, such as the robot 200 or300 shown in FIGS. 2 and 3. The robot may alternatively be a bipedrobot, such as the robot 400 shown in FIG. 4. Other examples also exist.In the paragraphs that follow, the flowchart 900 will be discussed withrespect to the quadruped robot 200 shown in FIG. 2.

FIG. 10A illustrates a side view and a top view of a body 1002 a of therobot 200 a coupled to a leg 1004 a, including a foot 1006 a, that is incontact with a ground surface 1008 at a first time. FIG. 10A alsoillustrates the body 1002 b of the robot 200 b coupled to the leg 1004b, including the foot 1006 b, that is in contact with a ground surface1008 at a second time, after the body 1006 b has moved in the forwarddirection. Thus, FIG. 10A may illustrate a distance travelled by thebody 1002 a, 1002 b of the robot 200 a, 200 b during a time period.

The first set of sensors may include position sensors in the leg 1004 a,1004 b of the robot 200 a, 200 b. The sensors may detect and relayposition and velocity data to a control system, and possibly othersystems, of the robot 200 a, 200 b. The first set of sensors may includeone or more sensors 1010 a, 1010 b located in a knee joint of the legthat detect the movements on the knee joint. The first set of sensorsmay also include one or more sensors 1012 a, 1012 b located in a hipjoint of the leg that detect movements of the hip joint. Other sensorsmay be included in the first set of sensors, and the location of thesesensors on the robot 200 a 200 b may be varied.

Based on the first data regarding the movement of the leg 1004 a, 1004 breceived from the first set of sensors, the robot 200 a, 200 b may,through the application of forward kinematics equations, determine anestimated distance travelled by the body 1002 a, 1002 b with respect tothe foot 1006 a, 1006 b of the robot 200 a, 200 b during the timeperiod. This may be referred to as kinematic odometry.

For example, the robot 200 a, 200 b may determine, based on kinematicodometry, a first estimated distance 1014 travelled by a point in thebody 1002 a, 1002 b with respect to the foot 1006 a, 1006 b. The pointin the body 1002 a, 1002 b may be, for instance, the approximategeometric center of the robot's body 1002 a, 1002 b. Other referencepoints within the robot may be used, such as the location of an inertialmeasurement unit 1016 a, 1016 b as shown in FIG. 10A, among otherexamples.

As shown in FIG. 10A, the first estimated distance 1014 may be the sumof line segments 1014 a and 1014 b, which represent the respectivedistances travelled by the body 1002 a, 1002 b with respect to the foot1006 a, 1006 b both before and after the body 1002 a, 1002 b passes overthe foot 1006 a, 1006 b. The line segments 1014 a and 1014 b are shownfor purposes of illustration, and might not be individually determinedby the robot 200 a, 200 b.

If it is assumed that the foot 1006 a, 1006 b remains in contact withthe ground surface 1008 during the time period, and does not slip orotherwise move relative to the ground 1008 during the time period, thenthe first estimated distance 1014 (i.e., the sum of 1014 a and 1014 b)travelled by the body 1002 a, 1002 b with respect to the foot 1006 a,1006 b may be approximately equal to the distance travelled by the body1002 a, 1002 b with respect to the ground surface 1008. Thus, utilizingthe assumption of a nonmoving, or relatively nonmoving stance foot 1006a, 1006 b, the robot 200 a, 200 b may determine an estimated distancetravelled by the body 1002 a, 1002 b of the robot 200 a, 200 b in theworld frame.

At block 904, the robot 200 may determine, based on second data from asecond set of sensors, a second estimate of the distance travelled bythe body of the robot in the time period. The second estimate is notbased on any foot of the robot that is in contact with the groundsurface 1008.

For example, the second set of sensors may include one or more inertialmeasurement units (IMUS) that may detect the robot's velocity andacceleration in the world frame, where the vertical axis is aligned withthe gravity vector. For instance, an IMU 1016 a, 1016 b may be locatedwithin the body 1002 a, 1002 b of the robot 200 a, 200 b, as shown inFIG. 10A. The IMU 1016 a, 1016 b may include a three-axis accelerometerthat may detect accelerations of the body 1002 a, 1002 b in one or moredirections.

The example IMU 1016 a, 1016 b may also include a three-axis angularrate sensor that may detect an estimated velocity of the robot's body inone or more directions. Utilizing the estimated velocity detected by theangular rate sensor, the robot 200 a, 200 b may integrate theacceleration data detected by the accelerometer to determine anestimated position of the body 1002 a, 1002 b of the robot 200 a, 200 b.The robot 200 a, 200 b may determine the estimated position of the bodyat both time 1 and time 2, and may then compare the two positions todetermine the second estimate of the distance 1018 travelled by the bodyof the robot 200 a, 200 b during the time period, as shown in FIG. 10A.

Although the examples discussed herein and shown in the FIGS. 10A-10Crelate to an IMU, other sensors may be used, alone or in combination, todetect the acceleration, velocity, and/or orientation of the robot todetermine the second estimate of the distance travelled by the body ofthe robot. For instance, other sensors that may determine the secondestimate may include RADAR, LIDAR, SONAR, VICON®, a GPS transceiver, twoor more cameras enabling stereo vision, among other examples. Othersensors and other estimates that are not based on any foot of the robotin contact with the ground surface are also possible.

At block 906, the robot 200 may compare a difference between the firstestimated distance and the second estimate distance to a thresholddifference. Unlike the first estimated distance 1014 discussed above,the second estimated distance 1018 travelled by the body 1002 a, 1002 bof the robot 200 a, 200 b in the world frame is not based on theassumption that the foot 1006 a, 1006 b is in contact with and nonmovingwith respect to the ground surface 1008. Thus, if the two estimates arethe same or nearly the same, it may indicate that the assumption is trueand the foot 1006 a, 1006 b has not moved with respect to the groundsurface 1008. Such an example is illustrated in FIG. 10A.

Conversely, a significant difference between the first and secondestimated distances may indicate that the assumption underlying thefirst estimate might not be true. FIG. 10B illustrates another exampleside view and top view of the robot 200 a, 200 b where the foot 1006 a,1006 b has slipped between time 1 and time 2. Here, the second estimateddistance 1020 determined based on the data from the IMU 1016 a, 1016 bmay indicate the approximate distance travelled by the body 1002 a, 1002b in the world frame.

However, the first estimated distance 1022 based on kinematic odometry,shown in FIG. 10B, might not approximate the distance travelled by thebody 1002 a, 1002 b with respect to the ground. In other words, it mightnot approximate the distance travelled by the body 1002 a, 1002 b in theworld frame. For example, if the foot 1006 a, 1006 b slips in both theforward and lateral directions (i.e., back and to the left) as shown inFIG. 10B, the first estimated distance 1022 may be the sum of linesegments 1022 a, 1022 b, and the lateral component of the slip 1022 c.Again, the line segments 1022 a, 1022 b, and 1022 c are shown forpurposes of illustration, and might not be individually determined bythe robot 200 a, 200 b.

As shown in FIG. 10B, the first estimated distance 1022 may be greaterthan the distance actually travelled by the body 1002 a, 1002 b in theworld frame, because the first estimated distance 1022 will include thedistance of the slip. Although FIG. 10B illustrates a slip of the foot1006 a, 1006 b in the forward and lateral directions, slips in thevertical direction are also possible, with similar effects.

FIG. 10C shows a top view of the foot 1006 a, 1006 b and the IMU 10106a, 1016 b at both time 1 and time 2. FIG. 10C corresponds to the exampleshown in FIG. 10B, where the foot 1006 a, 1006 b has slipped. The firstestimated distance 1022 and the second estimated distance 1020 are alsoshown, as well as the difference 1024 between the two distances 1022,1020. The robot 200 may then compare the difference 1024 to thethreshold difference, which may be represented by a variable ϵ.

Although determining the first and second estimates of the distancetravelled by the body 1002 a, 1002 b based on a single, scalarmeasurement may be sufficient to detect slips according to method 900,the robot 200 a, 200 b, may also determine the first and secondestimates of the distance travelled based on their component directionsin order to identify the component direction in which a slip occurs.

For example, the robot 200 a, 200 b may determine the first and secondestimates of the distance travelled in an x-, y-, and z-direction aswell as the scalar estimates. The robot may then compare the first andsecond estimates in each direction to a threshold differencecorresponding to each direction. Accordingly, the robot 200 a, 200 b maythus determine the particular direction(s) in which a given slip hasoccurred.

FIG. 10C shows the x-difference 1024 a between the first and secondestimates in the x-direction, as well as the y-difference 1024 b in they-direction. Because neither estimated distance included a distancetravelled in the z-direction between time 1 or time 2, there may be noz-difference. Further, the distances 1020 and 1022 shown in FIG. 10Crepresent may represent scalar quantities, unassociated with anyparticular direction at time 1 and time 2. In some cases, the robot maycompare the difference 1024 between the scalar distances to a scalarthreshold difference, ϵ_(mag), in addition to the comparison in thethree coordinate directions.

The threshold difference c may indicate the distance below which a slipof the robot's foot 1006 a, 1006 b may be too small to cause asignificant error to the robot's gait. Further, in some cases, therobot's potential reaction to a determined slip may further disrupt thegait of the robot 200 a, 200 b, and therefore it may be desirable totolerate small slips of the robot's foot 1006 a, 1006 b and correct themin subsequent steps, rather than initiate an immediate reaction.

The threshold difference c may be a predetermined or default value, andmay be different between different robot configurations (e.g., the sizeof the robot). In some cases, the threshold difference may be between 1and 50 centimeters. Other threshold differences are also possible.Further, the robot 200 a, 200 b may adjust the threshold difference atvarious times based on the gait of the robot 200 a, 200 b, the groundsurface conditions detected by the robot 200 a, 200 b, or slips or otherdisturbances detected by the robot 200 a, 200 b, among other factors.

In some cases, the threshold difference c may be not be equal for thedifferent coordinate directions. For instance, some robots and/or gaitsmay be relatively more sensitive to slips in the lateral direction,making it desirable to detect and account for smaller slips that mightotherwise be ignored if the slip was in, for instance, the forwarddirection. Therefore, the threshold ϵ_(y) may be smaller than ϵ_(x).Other examples are also possible.

In some examples, the robot 200 a, 200 b may determine the first andsecond estimates of the distance travelled by the body of the robot 200a, 200 b, continuously throughout a given step. For instance, the robot200 a, 200 b may detect the position and velocity of the foot 1006 a,1006 b at a certain frequency, and then update via kinematic odometrythe first estimate of the distance travelled by the body 1002 a, 100 bof the robot 200 a, 200 b at that frequency. Similarly, the robot 200 a,200 b may detect the acceleration and velocity of the body 1002 a, 1002b at a certain frequency, and then update via integration the secondestimate of the distance travelled by the body 1002 a, 100 b of therobot 200 a, 200 b at that frequency.

The frequency at which the two estimated distances are determined mightnot be the same. For instance, the robot 200 a, 200 b may determine thefirst estimate based on kinematic odometry at a rate within the range of1-1000 Hz. The robot 200 a, 200 b may determine the second estimatebased on the IMU measurements at a slower rate, within the range of, forexample, 1-100 Hz. The robot 200 a, 200 b may then compare thedifference between the determined first and second estimates to thethreshold difference when the estimates correspond to approximately thesame points in time. For instance, when a second estimate is determinedat the slower frequency, the robot 200 a, 200 b may use the mostrecently determined first estimate to determine the difference betweenestimates and compare it to the threshold.

At block 908, the robot 200 b may determine that the difference betweenthe first estimate and the second estimate exceeds the thresholddifference. The determination may be based on the comparison of thedifferences in all three coordinate directions and the scalar direction,and may further be based on at least one of the differences exceedingits respective threshold.

At block 910, based on the determination that the difference exceeds thethreshold difference, the robot 200 b may cause the robot to react. Forexample, the robot 200 b may take one or more actions based on thedetermination that a threshold difference has been exceeded. Forexample, the robot 200 b may generate an indication of slip. Theindication may be sent to systems within the robot 200 b that mayfurther respond to the slip or log the indication, among other examples.

Further, the robot 200 b may include a second foot that is not incontact with the ground surface, and may cause the second foot to makecontact with the ground surface based on the threshold being exceeded.For example, a slip may occur relatively early in a step, shortly afterthe foot 1006 a is in stance. In such an example, a positional orrotational error in the robot's gait that was introduced by the slip maycontinue to accelerate until the second, swinging leg completes itsswing trajectory and makes ground contact. However, in some situations,depending on the severity of the slip, the error may have grown toolarge for the second foot to arrest the error via ground reaction forcecontrol once it contacts the ground surface 1008. Therefore, it may bedesirable for the second foot to end its swing early in order to morequickly make contact with the ground surface 1008 and engage in groundreaction force control.

In some cases, the rapid step down of a foot that ends its swing earlybased on a detected slip may result in a relatively hard contact withthe ground surface 1008. This may lead to the detection of additionalslips, particularly where the terrain is relatively loose, such as sand.This may result in another rapid step of the robot 200 b, and thus acycle of slip detections and reactions. Thus, in some cases, the robot'sreaction to the initial determination that the threshold has beenexceeded may additionally or alternatively include increasing thethreshold difference.

For example, the robot 200 b may incrementally increase the thresholddifference such that a subsequent slip must be more severe than theinitial slip, i.e., the difference between the first and secondestimated distances must be greater than the initial slip for the robot200 b to react. This may include increasing one or more of ϵ_(x), ϵ_(y),ϵ_(z), or ϵ_(mag). The robot 200 b may maintain the increased thresholddifference for a predetermined period of time, or a predetermined numberof steps of the robot 200 b, so long as no additional slips aredetected. Other examples are also possible.

Further, the robot 200 b may react to slips that occur in eachcoordinate direction in a different way. For a slip detected in a givendirection, the reaction of the robot 200 b may include any of thereactions noted above, or other possible reactions, alone or incombination.

In some implementations, the example robot 200 may utilize operationsfrom both flowcharts 700 and 900 to detect slips of the robot's foot andto further determine which foot of the robot slipped. For example, therobot 200 may determine the relative distances between a pair of feet incontact with the ground surface at time 1 and time 2 and compare theirdifferences to a first threshold difference as shown in FIGS. 8A-8C andgenerally discussed above. Further, the robot 200 may determine firstand second estimates of a distance travelled by the body of the robotduring the time period (i.e., from time 1 to time 2) for each foot inthe pair of feet, and then compare the differences for both feet to asecond threshold difference.

Thus, when the robot 200 determines that the difference between the pairof feet between time 1 and time 2 has exceeded the first thresholddifference, the robot 200 may also determine that the first and secondestimates of the distance travelled by the body of the robot 200 duringthe same time period has exceeded the second threshold difference.Additionally, the robot 200 may identify the foot in the pair of feet asthe foot that slipped.

C. Example Implementations for Handling Gait Disturbances

Some robots may operate in gaits that control the state changes of thelegs of the robot based on a timer. For instance, a biped robot mayoperate in a timer-based walking gait that includes a swinging state anda stance state for the respective feet of the robot. As an example, thefeet of the robot may, in an alternating pattern, contact the ground andremains in the stance state for one-half of a second, then lift off ofthe ground and swing forward for one-half of a second before steppingdown again. The example biped robot walking in such a timer-based gaitmay engage in ground reaction force control to maintain the robot'sbalance and correct any errors that may occur in the gait. However, thetiming of the gait may remain relatively constant.

Alternatively or additionally, an example robot according to some of theexample implementations discussed herein may operate in a gait that ismechanically timed. For instance, the robot may determine when to end agiven state of the robot's foot based on data that is received by therobot. As an example, the robot may determine when to end a stance statefor a first foot based one an indication that a second foot in a swingstate has made contact with the ground. A combination of a mechanicallytimed and a timer-based gait is also possible.

FIG. 11 is an example illustration showing leg states in a mechanicallytimed gait of an example robot 1100. The robot 1100 may be, for example,the biped robot 400 shown in FIG. 4, or one of the quadruped robots 200,300 shown in FIGS. 2 and 3. Four leg states are shown: a Stance state1102, a Lift_Up state 1104, a Swing_Forward state 1106, and a Step_Downstate 1108. The arrows signifying each state may represent thetrajectory of the foot 1110 of the robot 1100 with respect to theconnection point between the robot's leg 1112 and its body 1114—in otherwords, the robot's hip 1116.

The robot 1100 may determine the end of each state of the robot's legbased on one or more events that may be detected by the robot 1100. Forexample, during the Stance state 1102, the foot 1110 may be in contactwith the ground surface 1118 and the robot 1100 may engage in groundreaction force control to support the robot's weight and maintain itsbalance. The Stance state 1102 may end when the robot 1100 detects thati) a second foot that is in the Swing state 1104 has made groundcontact, ii) the leg 1112 has reached a range of motion limit in one ormore joints in the leg 1112, iii) the foot 1110 has lost contact withthe ground surface 1118, among other possibilities. Other examples arealso possible.

Each joint in the stance leg 1112, such as a knee, ankle or hip joint,may include actuators for moving the joint that have a limited range ofmotion. If one of the actuators reaches a limit of its range of motion,it may no longer be able to cause the leg 1112 to exert a force inparticular direction. In some examples, a range of motion limit might bean extension or a retraction limit for a linear actuator, or arotational limit for a rotary actuator. Other examples are alsopossible. If a limit is reached, the robot 1100 may not be able toeffectively engage in ground reaction force control using the stance leg1112, and may thus end the Stance state 1102.

The Lift_Up state 1104 may be brief, and may correspond to the foot 1110lifting off of the ground at a desired velocity with respect to therobot's body 1114. The desired velocity may have forward, lateral, andvertical components. For example, the robot 1100 may first determine thecurrent velocity of the stance foot 1110 with respect to the body 1114in the forward (x-axis) direction. If it is assumed that the stance foot1110 is in contact with the ground surface 1118 and is not slipping, thevelocity of the stance foot 1110 with respect to the body 1114 in theforward (x-axis) direction may be equal to and opposite the velocity ofthe robot's body 1114 with respect to the ground 1118 in the forward(x-axis) direction. The robot may determine, in other words, an estimateof the robot's current forward velocity.

In some cases, the desired velocity for the foot 1110 in the Lift_Upstate 1104 may have a forward component that is equal to and oppositethe current forward velocity of the robot 1100. The foot 1100 in theLift_Up state 1104 may also lift off of the ground with vertical andlateral velocity components that might not be determined based on thecurrent forward velocity of the robot 1100. The Lift_Up state 1104 mayend when the robot 1100 detects that the foot 1110 loses contact withthe ground surface 1118.

During the Swing_Forward state 1106, the foot 1110 of the robot 1100 mayfollow a smooth trajectory to a determined swing height, then follow thetrajectory toward a determined step down location. The Swing_Forwardstate 1106 may end when i) the foot 1110 reaches the end of thetrajectory or ii) makes contact with the ground surface 1118.

The Step_Down state 1108 may be brief, and may correspond to the foot1110 approaching the ground at a determined velocity with respect to therobot's body 1114. Similar to the Lift_Up state 1102, the determinedvelocity may have forward, lateral, and vertical components, and theforward component may be equal to an opposite the current forwardvelocity of the robot with respect to the ground surface 1118. TheStep_Down state 1108 may end when the robot 1100 detects that i) thefoot 1110 has made contact with the ground surface 1118, ii) the leg1112 has reached a range of motion limit in one or more joints in theleg 1112, or iii) the foot 1110 has not made contact with the groundsurface 1118 within a nominal time that was determined for theSwing_Forward state 1106 and the Step_Down state 1108.

For example, if the leg 1112 reaches a range of motion limit in one ormore of its joints during the Step_Down state 1108 without contactingthe ground surface 1118, the robot 1100 may eventually tip over if theleg 1112 continues in the Step_Down state 1108 and the stance legcontinues in the Stance state 1102. Thus, the robot 1100 may lift up thestance leg, lowering the robot's body 1114, and transition the leg 1112from the Step_Down state 1108 into the Stance state 1102 to catch therobot 1100 when it lands. Further, the robot 1100 might not be able tofully engage in ground reaction force control if the foot 1110 in theStep_Down state 1108 makes contact with the ground surface 1118 if ithas reached a range of motion limit. Thus, the robot 1100 may alsotransition the foot 1110 into the Stance state 1102 in order to regainsome of the range of motion in the leg 1112.

Further, although the transitions between leg states shown in FIG. 11might not be determined based on a timer, the robot 1100 may nonethelessdetermine an anticipated time for the first foot 1100 to complete theSwing_Forward state 1106 and the Step_Down state 1108. If the robot 1100determines that the foot 1110 has not made contact with the groundsurface 1118 within the estimated time, or within a threshold deviationfrom the estimated time, it may indicate that the robot 1100 has, forexample, stepped off of a ledge. Rather than continuing to step down atthe risk of, perhaps, tipping over, the robot 1100 may transition theleg 1112 to the Stance state 1102 and further lift up the current stanceleg, as noted above.

For each of the leg states discussed above, there may be additionalconditions or fewer conditions that may cause the robot 1100 to end agiven state. Further, some mechanically timed gaits may include more orfewer states, which may serve additional purposes based on the gait andthe particular robot.

In some instances, the robot 1100 may adjust the timing of amechanically timed gait to handle detected disturbances to the gait,among other possible responses. Some example disturbances have beendiscussed above, such as a slip of the robot's foot, or an indicationthat a leg actuator has reached a range of motion limit. Other examplesare also possible.

1. First Example Implementation for Handling Gait Disturbances

FIG. 12 is a flowchart 1202 illustrating operations for handlingdisturbances to the gait of a robot. At block 1202, a robot may detect adisturbance to a gait of the robot. The robot may be any of the examplerobots noted above, among other possibilities. For ease of comparisonwith some of the other example methods noted above, the flowchart 1200will be discussed with respect to the robot 200 shown in FIG. 2.However, the flowchart 1200 and the examples described below may also becarried out by robots having other configurations, such as the bipedrobot 400 shown in FIG. 4.

The gait of the robot 200 may include a swing state and a step downstate, and the swing state may include a target swing trajectory for thefoot of the robot 200. The target swing trajectory may have a beginningand an end, as well as other attributes that are determined by the robot200 to obtain or maintain a desired velocity of the robot 200 or toavoid obstacles, among other possibilities. For example, the targetswing trajectory may include a target swing height. The target swingtrajectory may be determined by the robot 200 before the disturbance isdetected.

Disturbances may generally refer to any event or effect that may disruptor potentially disrupt the robot's gait. For instance, the gait of therobot 200 may also include a stance state, and a second foot of therobot may be in the stance state while the first foot is in the swingstate. Referring to the example shown in FIG. 8A-8B, the first foot maybe the foot 802 a, 802 b and the second foot may be foot 808. Thus, thedisturbance detected by the robot 200 at block 1202 may be a slip of therobot's stance foot, as shown in FIG. 8B.

As another example, the detected disturbance may be an indication thatthe target swing trajectory of the robot's foot is within a thresholddistance of the stance leg of the robot 200. This may indicate, forinstance, that a possible collision between the legs of the robot mayoccur during the swing trajectory. For example, the robot 200 mayinclude sensors in its legs that may detect the position of the legswith respect to the robot's body. This may allow the robot 200 todetermine that a target swing trajectory of a swinging leg may intersector nearly intersect with the current position of the stance leg. In somecases, detecting such an indication of a possible leg collision may be adisturbance that causes a reaction by the robot.

As yet another example, the detected disturbance may be an indicationthat an actuator in one of the leg joints of the stance leg has reacheda range of motion limit, thereby limiting the stance leg's ability toengage in ground reaction force control. Other examples of disturbancesthat may be detected by the robot, alone or in combination, one or moreof the examples noted above, are also possible.

At block 1204, based on the detected disturbance, the robot 200 maycause the foot of the robot to leave the swing state and enter the stepdown state before the foot reaches the end of the target swingtrajectory. For instance, the robot 200 may cause the swing foot to stepdown early and contact the ground surface at a location different than atarget location determined as part of the gait.

In some cases, the robot 200 may determine a desired velocity for thefoot with respect to the robot's body. The robot may then cause the footof the robot 200 to make contact with the ground surface at the end ofthe step down state at the desired velocity. The desired velocity mayhave a forward component, as well as lateral and vertical components.The robot 200 may base the desired velocity for the foot in part on thecurrent velocity of the robot 200 with respect to the ground surface.For example, before determining the desired velocity for the foot, therobot 200 may determine the current velocity of a stance foot withrespect to the robot's body in the forward (x-axis) direction based onreceived position and velocity sensor data and forward kinematics. If itis assumed that the stance foot is in contact with the ground surfaceand is not slipping, the velocity of the stance foot with respect to thebody in the forward (x-axis) direction may be equal to and opposite thevelocity of the robot's body with respect to the ground in the forward(x-axis) direction. The robot 200 may determine, in other words, anestimate of the robot's forward velocity.

In some cases, the forward component of the desired velocity determinedby the robot 200 for the foot in the step down state may be equal to andopposite the forward component of the current velocity of the robot 200with respect to the ground surface. The robot 200 may also determinevertical and lateral velocity components for the foot in the step downstate. These velocity components might not be based on the currentforward velocity of the robot 200.

The robot 200 may react to the detected disturbance in other ways aswell. For instance, for some detected slips of the stance foot, therobot 200 may detect that the second stance foot has lost contact withthe ground surface. Based on detecting that the second foot has lostcontact with the ground surface, the robot 200 may cause the second footto make contact with the ground surface by extending the second leg. Forexample, the robot 200 may cause the second foot to discontinue groundreaction force control, and instead engage in position control byreaching the foot down to reacquire ground contact. Once ground contactis reestablished, the second foot may resume ground reaction forcecontrol.

In some cases, a detected slip of the robot's second foot may exceed athreshold slip distance. The threshold slip distance may be determinedby the robot 200 before the slip is detected. Two such examples areshown in FIGS. 8A-8C and 10A-10C, and other examples are also possible.Based on the detected disturbance of the slip that is greater than thethreshold slip distance, and before causing the foot to enter the stepdown state, the robot may increase the threshold slip distance such thata subsequent slip must be more severe than the previous slip. This mayavoid a cycle of slip detections and reactions, particularly for terrainthat is relatively loose, where the rapid step down of a foot that endsits swing early based on the detected slip may result in a relativelyhard contact with the ground surface.

Further, in some cases the robot 200 may determine a firstrepresentation of a coefficient of friction between the foot of therobot 200 and the ground surface. The robot 200 may use the determinedrepresentation of the coefficient of friction to determine a thresholdorientation for a ground reaction force that may act upon the foot.Examples of such a threshold orientation are shown in in FIGS. 6A-6D,and other examples are also possible. Based on the detected disturbanceof the slip of the robot's foot, and before causing the foot to enterthe step down state, the robot may update the representation of thecoefficient of friction such that the updated representation is lessthan the first representation. Consequently, the robot may adjust theground reaction forces that act upon the robot's feet to require lessfriction, which may reduce the likelihood of another slip occurring.

Other reactions by the robot to a detected disturbance to the gait ofthe robot are also possible, and may be implemented by the robot aloneor in any combination with the examples discussed herein.

2. Second Example Implementation for Handling Gait Disturbances

FIG. 13 is a flowchart 1300 illustrating operations for handlingdisturbances to the gait of a robot. Specifically, flowchart 1300 is anexample implementation that may be performed by a robot that detects anindication that a foot in a swinging state made early contact with theground surface, before the end of its planned trajectory.

At block 1302, a robot having a first foot and a second foot maydetermine a gait for the robot. The robot may be any of the examplerobots noted above, among other possibilities. For ease of comparisonwith some of the other example methods noted above, the flowchart 1500will be discussed with respect to the robot 200 shown in FIG. 2.However, the flowchart 1500 and the examples described below may also becarried out by robots having other configurations, such as the bipedrobot 400 shown in FIG. 4, unless noted otherwise.

The determined gait of the robot 200 may include a swing state and astance state, and the swing state may include a target swing trajectoryfor the first foot of the robot 200. The target swing trajectory mayhave a beginning and an end, as well as other attributes that aredetermined by the robot 200 to obtain or maintain a desired velocity ofthe robot 200 or to avoid obstacles, among other possibilities. Forexample, the target swing trajectory may include a beginning position, atarget swing height, and an end position, each with respect to therobot's hip, among other possibilities. The target swing trajectory maybe determined by the robot 200 before the disturbance is detected.

At block 1304, the robot 200 may detect an indication that the firstfoot of the robot has contacted a ground surface before the end of thetarget swing trajectory. For example, the robot 200 may encounterrelatively uneven terrain where the ground surface may rise or fallunexpectedly.

FIG. 14 shows an example of the robot 200 with legs 1402 traversing apath 1404. The path 1404 may include sections that have a relativelyeven ground surface 1404 a, 1404 b. The path 1404 may also includesections that are relatively uneven. For instance, the ground surfacemay include a relatively rapid decline or drop-off, such as the stream1406, or a relatively rapid incline or step-up, such as the hill 1408 orthe stairs 1410.

When the robot 200 traverses the path 1404 and reaches the hill 1408 orthe steps 1410, the right front foot 1402 a (i.e., the first foot) maybe in the swing state. The target swing trajectory of the first foot mayapproximate a relatively even ground surface. However, the first foot1402 a may make contact with the ground surface a portion of the way upthe hill, or on the first step. Either of these locations may correspondto a point in the target swing trajectory that is before the end of thetrajectory. Other examples of uneven and/or unpredictable groundsurfaces are also possible.

At block 1306, the robot 200 may, based on the detected indication thatthe first foot has contacted the ground surface, cause the second footto lift off of the ground surface. For instance, in an example case of abiped robot, and for some gaits of a quadruped robot, the indication ofthe early ground contact by the first foot may cause the robot totransition the first foot to the stance state, and transition the secondfoot to the swing state. In the example shown in FIG. 14, the robot 200may be traversing the path 1404 in a gait where the second foot 1402 b,may lift off of the ground surface when the first foot 1402 a makescontact.

However, for some situations involving a biped, quadruped, or other typeof robot, the robot may react in one or more additional ways to theindication of the early ground contact, before causing the second footto lift off of the ground. In some cases, the robot 200 may detect anindication that a third leg of the robot 200 has contacted the groundsurface, and then cause the second foot to lift off of the groundsurface based on this additional indication.

For example, the quadruped robot 200 shown in FIG. 14 may traverse thepath 1404 in a trotting gait, where the first foot 1402 a and the thirdfoot 1402 c are in the swing state at approximately the same time. Afterdetecting that the first leg has made an early ground contact with, forexample, the hill 1408, the robot 200 may wait for the third leg tocontinue its target swing trajectory before lifting the second foot 1402b and fourth foot 1402 d off of the ground. This may allow the robot 200to maintain two stance legs in contact with the ground surface to engagein ground reaction force control.

In another example, the robot 200 may detect an indication of an earlytouchdown location for the first foot. The robot 200 may furtherdetermine a desired touchdown location for the first foot, and thencause the second foot to lift off of the ground surface based on adetermination that the early touchdown location is diverging from thedesired touchdown location. For example, as the first foot 1402 a of therobot 200 progresses through the target swing trajectory, the robot 200may continuously determine a desired touchdown location for the firstfoot 1402 a that would, if the first foot 1402 a were to touch down atthat moment, allow the robot 200 to maintain its balance, continueoperating in its current gait, at its current velocity, among otherconsiderations. Thus, the desired touchdown location for the first foot1402 a may generally progress forward, in the direction of the robot'sgait, as the robot's body 1412 moves forward over the second foot, instance, and the first foot 1402 a is in a swinging state.

For example, the first foot 1402 a of the robot 200 shown in FIG. 14 maymake contact with the stairs 1410 relatively late in the target swingtrajectory, when the first foot 1402 a is extended in front of the robot200. Therefore, the early touchdown location may be ahead of the desiredtouchdown location. Further, the desired touchdown location may bemoving forward, toward the early touchdown location as the robot's body1412 continues to move forward on its second foot, in stance. In thissituation, it may be desirable to keep the second foot in the stancestate while the location of the first foot 1402 a, with respect to thedesired location and the robot's overall balance, is improving. Thus,the robot may wait until the desired touchdown location has moved pastthe early touchdown location, or is otherwise diverging from the earlytouchdown location of the first foot 1402 a before causing the secondfoot of the robot to lift of off the ground surface and transitioningthe first foot 1402 a into stance.

Additionally, the robot 200 may, before detecting the indication of theearly ground contact of the first foot 1402 a, determine a target groundreaction force for the first foot 1402 a. Then, based on the detectedindication of the early ground contact, the robot 200 may determine anadjusted ground reaction force for the first foot that is less than thetarget ground reaction force. For example, the adjusted ground reactionforce may be a minimal force, approximately one tenth of the targetground reaction force. The robot 200 may then cause the first foot 1402a to apply a force to the ground surface approximately equal to andopposing the adjusted ground reaction force before causing the secondfoot 1402 b to lift off of the ground surface. The adjusted groundreaction force may maintain contact between the first foot 1402 a andthe ground surface as the robot 200 waits for an additional indication,such as those described above. Other possibilities exist.

Further, the force applied to the robot 200 from the early groundcontact of the first foot 1402 a may act as a disturbance to the gait ofthe robot 200. Therefore, in some examples the robot 200 may, beforecausing the second foot 1402 b to lift off the ground surface, determinea first force exerted on the robot 200 based on the first foot 1402 acontacting the ground surface before the end of the target swingtrajectory. Based on the first force, the robot 200 may determine asecond force that opposes the first force. The robot 200 may then causethe second foot 1402 b to apply the second force to the robot 200 viacontact with the ground surface, before causing the second foot 1402 bto lift off of the ground surface. Alternatively or additionally, therobot 200 may cause the fourth foot 1402 d to apply the second force tothe robot via contact with the ground surface before causing the fourthfoot 1402 d to lift off of the ground surface. In this way, the robot200 may correct the gait disturbance that may result from the earlyground contact of the first foot 1402 a.

The reactions discussed above may be implemented by an example robotalone or in combination, and other reactions are also possible. Further,unless noted otherwise (e.g., where a reaction requires a third leg) thereactions may be carried out a by either a biped or a quadruped robot,among other robot configurations.

3. Third Example Implementation for Handling Gait Disturbances

FIG. 15 is a flowchart 1500 illustrating operations for handlingdisturbances to the gait of a robot. Specifically, flowchart 1500 is anexample implementation that may be performed by a robot that detects anindication that a foot in a swinging state made early contact with theground surface, before the end of its planned trajectory.

At block 1502, a robot having a first foot and a second foot maydetermine a gait for the robot. The determined gait of the robot mayinclude a swing state and a stance state. The robot may be any of theexample robots noted above, among other possibilities. For ease ofcomparison with some of the other example methods noted above, theflowchart 1500 will be discussed with respect to the robot 200 shown inFIG. 2. However, the flowchart 1500 and the examples described below mayalso be carried out by robots having other configurations, such as thebiped robot 400 shown in FIG. 4.

At block 1504, the robot 200 may determine an anticipated time for thefirst foot of the robot in the swing state to contact a ground surface.Although the transitions between the leg states of the determined gaitmight not be determined based on a timer, the robot 200 may nonethelessdetermine an anticipated time for the first foot 1402 a to complete atarget swing trajectory and make contact with the ground surface.

At block 1506, the robot 200 may detect an indication that the firstfoot 1402 a of the robot has not contacted the ground surface within theanticipated time. For example, the robot 200 may encounter relativelyuneven terrain where the ground surface may rise or fall unexpectedly.

Returning to FIG. 14, the robot 200 may traverse the path 1404 and reachthe stream 1406 as the first foot 1402 a is in the swing state. Theanticipated time for the first foot 1402 a to contact a ground surfacemay anticipate a relatively even ground surface. Thus, some steps of therobot on uneven terrain may result in a late ground contact with respectto the anticipated time.

However, the first foot 1402 a may step down over the edge of thestream. Similarly, the robot 200 traversing the path 1404 shown in FIG.14 in the opposite direction may encounter the stairs 1410 from the top.Thus, the first foot 1402 a may have to step down to reach the firststair. In either case, the first foot 1402 a might not make contact withthe ground surface within the anticipated time. Other examples of unevenand/or unpredictable ground surfaces are also possible.

At block 1508, the robot may, based on the detected indication, reduce aground reaction force on the second foot in contact with the groundsurface. For example, in some cases the robot 200 may reduce the groundreaction force on the second foot 1402 b to lower the body 1412 of therobot on the second foot with respect to the ground. The robot 200 may,for instance, lower the elevation of the robot's hip coupled to thesecond foot 1402 b.

Lowering the body 1412 of the robot 200 on the second foot 1402 b mayresult in the first foot 1402 a making contact with the ground surface.For example, the first foot 1402 a may make contact with the bottom ofthe stream 1406, or the first stair down from the top of the stairs1410, and may then transition into the stance state.

In some examples, the robot 200 may lower the body 1412 until the robotdetects one of i) an indication that the first foot 1402 a of the robot200 contacted the ground, or ii) an indication that the body has beenlowered a threshold distance. For instance, the stream 1406 shown inFIG. 14 may be relatively deep. Further, the robot 200 may encounter thetop of the stairs 1412 when the first foot 1402 a is following arelatively long swing trajectory, such that the first foot 1402 a mayextend beyond the first stair when it steps down.

If ground contact is not made before the threshold is reached, the robot200 may detect an indication that the body 1412 has been lowered thethreshold distance. Based on the detected indication, the robot 200 maycause the first foot 1402 a to enter the stance state and cause thesecond foot 1402 b to enter the swing state. The robot may further causethe first foot 1402 a to engage in position control by reaching the footdown to reacquire ground contact. Once ground contact is reestablished,the first foot 1402 a may resume ground reaction force control.

The reactions discussed above may be implemented by an example robotalone or in combination, and other reactions are also possible. Further,unless noted otherwise the reactions may be carried out a by either abiped or a quadruped robot, among other robot configurations.

IV. Conclusion

While various implementations and aspects have been disclosed herein,other aspects and implementations will be apparent to those skilled inthe art. The various implementations and aspects disclosed herein arefor purposes of illustration and are not intended to be limiting, withthe true scope and spirit being indicated by the following claims.

What is claimed is:
 1. A method comprising: receiving, at a controlsystem of a robot while the robot is executing a gait pattern, anindication that a first foot of the robot and a second foot of the robotare in contact with a ground surface; and while the first foot and thesecond foot remain in contact with the ground surface: determining, bythe control system, a position of the first foot relative to the secondfoot at a first time; at a second time subsequent to the first time,determining, by the control system, whether the position of the firstfoot relative to the second foot has changed from the first time by athreshold difference; and when the position of the first foot relativeto the second foot has changed from the first time by the thresholddifference, causing, by the control system, a third foot currently in aswing state to make early contact with the ground surface.
 2. The methodof claim 1, wherein the first time occurs at least a threshold period oftime after receiving the indication.
 3. The method of claim 2, whereinthe threshold period of time comprises a period of time within a rangeof 10-50 milliseconds after receiving the indication.
 4. The method ofclaim 1, further comprising, when the position of the first footrelative to the second foot has not changed from the first time by thethreshold difference, continuing, by the control system, execution ofthe gait pattern.
 5. The method of claim 4, further comprising, whilethe first foot and the second foot remain in contact with the groundsurface: at a third time subsequent to the second time, determining, bythe control system, whether the position of the first foot relative tothe second foot at the third time has changed from the first time by thethreshold difference; and when the position of the first foot relativeto the second foot at the third time has changed from the first time bythe threshold difference, causing, by the control system, the third footcurrently in the swing state to make early contact with the groundsurface.
 6. The method of claim 5, wherein a first duration of timebetween the first time and the second time is equal to a second durationof time between the second time and the third time.
 7. The method ofclaim 5, wherein a first duration of time between the first time and thesecond time is different than a second duration of time between thesecond time and the third time.
 8. The method of claim 1, furthercomprising, while the first foot and the second foot remain in contactwith the ground surface: receiving, at the control system, position datafrom a set of sensors disposed on the robot; and determining, by thecontrol system, the position of the first foot relative to the secondfoot based on the received position data.
 9. The method of claim 1,wherein the gait pattern comprises a trotting gait.
 10. The method ofclaim 1, wherein the first foot comprises one of a front foot or a rearfoot and the second foot comprises the other one of the front foot orthe rear foot disposed on an opposite side of a body of the robot thanthe first foot.
 11. A robot comprising: a first foot; a second foot; athird foot; and a control system comprising a processor and memory incommunication with the processor, the memory storing programinstructions that, when executed by the processor, cause the processorto perform operations comprising: executing a gait pattern; receiving anindication that the first foot and the second foot are in contact with aground surface; and while the first foot and the second foot remain incontact with the ground surface: determining a position of the firstfoot relative to the second foot at a first time; at a second timesubsequent to the first time, determining whether the position of thefirst foot relative to the second foot has changed from the first timeby a threshold difference; and when the position of the first footrelative to the second foot has changed from the first time by thethreshold difference, causing the third foot currently in a swing stateto make early contact with the ground surface.
 12. The robot of claim11, wherein the first time occurs at least a threshold period of timeafter receiving the indication.
 13. The robot of claim 12, wherein thethreshold period of time comprises a period of time within a range 10-50milliseconds after receiving the indication.
 14. The robot of claim 11,wherein the operations further comprise, when the position of the firstfoot relative to the second foot has not changed from the first time bythe threshold difference, continuing execution of the gait pattern. 15.The robot of claim 14, wherein the operations further comprise, whilethe first foot and the second foot remain in contact with the groundsurface: at a third time subsequent to the second time, determiningwhether the position of the first foot relative to the second foot atthe third time has changed from the first time by the thresholddifference; and when the position of the first foot relative to thesecond foot at the third time has changed from the first time by thethreshold difference, causing the third foot currently in the swingstate to make early contact with the ground surface.
 16. The robot ofclaim 15, wherein a first duration of time between the first time andthe second time is equal to a second duration of time between the secondtime and the third time.
 17. The robot of claim 15, wherein a firstduration of time between the first time and the second time is differentthan a second duration of time between the second time and the thirdtime.
 18. The robot of claim 11, wherein the operations furthercomprise, while the first foot and the second foot remain in contactwith the ground surface: receiving position data from a set of sensorsdisposed on the robot; and determining the position of the first footrelative to the second foot based on the received position data.
 19. Therobot of claim 11, wherein the gait pattern comprises a trotting gait.20. The robot of claim 11, wherein the first foot comprises one of afront foot or a rear foot and the second foot comprises the other one ofthe front foot or the rear foot disposed on an opposite side of a bodyof the robot than the first foot.